OPC Studio User's Guide and Reference
Create<TValue>(String,String,String) Method



OpcLabs.EasyOpcClassic Assembly > OpcLabs.EasyOpc.DataAccess.Reactive Namespace > DAWriteItemValueObserver Class > Create Method : Create<TValue>(String,String,String) Method
Name of the machine (empty string for local computer).

The value represents a UNC or DNS computer name. Any string can be passed to this parameter (i.e. will not cause System.ArgumentException), but not all values make sense and will work when an operation using them is attempted. IPv6 addresses are normally enclosed between '[' and ']'.

The value of this parameter cannot be null (Nothing in Visual Basic).

Contains ProgID of the OPC server.

The value of this parameter cannot be null (Nothing in Visual Basic).

ID of the item that will be written into.

The value of this parameter cannot be null (Nothing in Visual Basic).

Creates a new observer that writes values into an OPC item, specifying machine name, server class, and item ID.
Syntax
'Declaration
 
<NotNullAttribute()>
Public Overloads Shared Function Create(Of TValue)( _
   ByVal machineName As String, _
   ByVal serverClass As String, _
   ByVal itemId As String _
) As DAWriteItemValueObserver(Of TValue)
'Usage
 
Dim machineName As String
Dim serverClass As String
Dim itemId As String
Dim value As DAWriteItemValueObserver(Of TValue)
 
value = DAWriteItemValueObserver.Create(Of TValue)(machineName, serverClass, itemId)
[NotNull()]
public:
static DAWriteItemValueObserver<TValue^>^ Creategeneric<typename TValue>
( 
   String^ machineName,
   String^ serverClass,
   String^ itemId
) 

Parameters

machineName
Name of the machine (empty string for local computer).

The value represents a UNC or DNS computer name. Any string can be passed to this parameter (i.e. will not cause System.ArgumentException), but not all values make sense and will work when an operation using them is attempted. IPv6 addresses are normally enclosed between '[' and ']'.

The value of this parameter cannot be null (Nothing in Visual Basic).

serverClass
Contains ProgID of the OPC server.

The value of this parameter cannot be null (Nothing in Visual Basic).

itemId
ID of the item that will be written into.

The value of this parameter cannot be null (Nothing in Visual Basic).

Type Parameters

TValue

Return Value

Returns an observer that writes values into the given OPC item.

This method never returns null (Nothing in Visual Basic).

Remarks
The DAReactive.DefaultClientSelector selector will be used for OPC Data Access operations.
Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also